import sys
import getpass
import base64
import urllib.request
import json

if __name__ == "__main__":
    print(u"Please specify your openproject server:")
    api = sys.stdin.readline().strip()
    apikey = getpass.getpass(prompt=u"Please specify your API key:")
    conn = urllib.request.Request(
        api,
        data=json.dumps(),
        headers=json.dumps({"Authorization":
                                "Basic " + base64.encodebytes(
                                    ("apikey:" + apikey).encode("utf-8")).decode("utf-8")}),
        method='GET')
